{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<p><a href=\"https://github.com/mwouts/jupytext\", style=\"color: rgb(0,0,255)\">Jupytext</a> on GitHub</p>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%html\n",
    "<p><a href=\"https://github.com/mwouts/jupytext\", style=\"color: rgb(0,0,255)\">Jupytext</a> on GitHub</p>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\frac{\\pi}{2}$"
      ],
      "text/plain": [
       "<IPython.core.display.Latex object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%latex\n",
    "$\\frac{\\pi}{2}$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "%load_ext rpy2.ipython"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAMAAABKCk6nAAAAvVBMVEUAAAAAADoAAGYAOpAAZrYzMzM6AAA6ADo6AGY6OpA6kNtNTU1NTW5NTY5NbqtNjshZWVlmAABmADpmAGZmtv9uTU1uTY5ubqtuq6tuq+SOTU2OTY6Obo6ObquOjsiOq+SOyP+QOgCQOjqQ2/+rbk2rbm6rbo6r5P+2ZgC2///Ijk3Ijm7Ijo7IyP/I///bkDrb///kq27kq47k/8jk///r6+v/tmb/yI7/25D/5Kv//7b//8j//9v//+T///86OkyFAAALnElEQVR4nO3cbXecZRWGYbSOLwy0voAYXjSVamvRSrCShqTz/3+WSYF1rVU3I07uOe87O+fxgeWnPM++TiaJIn1np9bemf0COi4DN2fg5gzc3P7A/55l3pOHm3aKgRkGLl9u2pOHM3D5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41OcSA5f6XHJw4NdPto8MfAccGvj8ZPf81MDrOzTwV09vGu82m83e79+6C6rAX3wbePe/PsFHNO/Jw0075YcDf2XggRYM/GN/Bh/z5aY9ebgFA//Y36KP+XLTnjzcgoFj1rsZeMSDDYwwcPly0548nIHLl5v25OEMXL7ctCcPZ+Dy5aY9eTgDly837cnDGbh8uWlPHs7A5ctNe/JwBi5fbtqThzNw+XLTnjycgcuXm/bk4Qxcvty0Jw9n4PLlpj15OAOXLzftycMtHXiaRv9vsMmnGPjYDFwx8CiLBtYoBm7OwM0ZuLk1Az9/NPsNBjnfbrcPX858gyUDX3766YvZ7zDGzb8h8sXTmW+wZOCzk7PT2e8wxk3gv0/9m3XFwK//8vTio6nf14a5+Rb9voHfcvHhdvve1O9rw9x8gs9OZr7BioFv/s2386mrDPMm8NQfNwsGvvzkxXd/ufv8LVpHZuDmDNycgZszcHMGbs7AzRm4uXsb+NmDL68evzv7LY7v3gbePXv32c9mvwPg/ga+evzgy9nvALi/gV/9/Cefz34HwL0NfPX4g6/vw0f4vga+enz9A/g+/BC+r4HvDQM3Z+DmDNycgZszcHMGbu4/YxSo3dDh4jUAAAAASUVORK5CYII=\n"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%R\n",
    "library(ggplot2)\n",
    "ggplot(data=data.frame(x=c('A', 'B'), y=c(5, 2)), aes(x,weight=y)) + geom_bar()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x2da0c41a9e8>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAMYAAACMCAYAAAAnWNZXAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC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AYQIEwgAJhAAXCAAqEARQIAygQBlBougffetsHbR+yvbXtoYCuNdmDb5Gk7ZI2SFot6R7bq9seDOhSkxXjBkmHkhxO8qekHZLuaHcsoFtNwlgm6ZszHh+d+RmwYM26OaXqjSlz1kH2uKTxmYe/2j54IYPNgRFJJ/p5Qj/dz7PNO31/PfVkK3uiXtXkoCZhHJW04ozHyyV9+9+DkkxImmg02gCwPZlkrOs5FoqF9no2uZT6VNK1tq+2fbGkzZLebncsoFtN9vk+aftBSe9JWiTplSQHWp8M6FCTSykl2SVpV8uzzLV5c9k3Tyyo19PJWffRwNDjIyFAgTCAwlCHYXut7e1dz4HB0+jmeyGxfb2keyXdLekrSTu7nWhhsD0i6ccskJvWoVgxbF9n+wnb05Ke1+mPuDjJTUme63i8ecf2jbb32N5pe43t/ZL2S/re9vqu5+uHoXhXyvYpSR9JeiDJoZmfHU5yTbeTzU+2JyU9LmmpTr9NuyHJXturJL2eZE2nA/bBUKwYku6UdEzSbtsv2r5Z9WfA0MziJO8neUPSsSR7JSnJlx3P1TdDEUaSt5JskrRK0h5JD0u60vYLtm/pdLj56dQZ3//xn+cWxCXIUFxKVWxfIekuSZuSrOt6nvnE9l+SftPpVfdSSb//85SkS5Is6Wq2fhnaMIBzGYpLKeB8EQZQIAygQBhAgTCAwt/7zRbab6vZ+QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 216x144 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "pd.Series({'A':5, 'B':2}).plot(figsize=(3,2), kind='bar')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
